#coding:utf-8
# 分段器
# 
# 
# 



def subsector_type1(string,subsection_len, r_offset=False):
    """
        分段器1
        描述:普通分段方式,存储的是坐标,分段最后不足的舍弃-非重叠
    """
    data =  []
    str_len = len(string)  #序列长度
    left_count = str_len % subsection_len
    for i in range(str_len/subsection_len):
        data.append((i*subsection_len + r_offset, ((i+1)*subsection_len + r_offset - 1) % str_len))
    return data 


def subsector_type2(string, subsection_len):
    """
        分段器2
        描述:
    """
    pass

def subsector_type3(string):
    pass



def main():
    string = "0110010010011"
    str_len = len(string)  
    coordinate_set = subsector_type1(string,3,0)
    for coordinate in coordinate_set:
        print coordinate
        if coordinate[1] < coordinate[0]:
            print (string[coordinate[0]:(coordinate[1]+1)%str_len])
        else:
            print string[coordinate[0]:coordinate[1]+1]

if __name__ == '__main__':
    main()